<?php

/**
 * Description of TestController
 *
 * @author Mon Zafra <monzee@gmail.com>
 * @license default
 */
class TestController extends Zend_Controller_Action
{
    public function indexAction()
    {
    }

    public function tpltestAction()
    {
        $this->view->name = $this->_getParam('name');
        $this->view->examples = array(
            'Variable' => '{~ $var }',
            'View member' => '{~ {var} }',
            'Object member' => '{~ {$var.property} }',
            'View member member' => '{~ {var.property} }',
            'Array' => '{~ [0, [1, 2], "a":"b", "c":["d"]] }',
            'Array member' => '{~ {$var-0} {$var-index} {$var-$foo-index-0} }',
            'Echo' => '{={var}}',
            'Autoescape' => '{{var}}',
            'Explicit escape' => '{\{var}}',
            'Translate' => '{_{var}}',
            'Nested operators 1' => '{\\_{var}}',
            'Nested operators 2' => '{_\\{var}}',
            'Function call 1' => '{@ | date }',
            'Function call 2' => '{@ $var | print_r }',
            'View helper call' => '{@ $title | {headTitle} }',
            'Function call with expression positioning' => '{= {hash} | implode "-" % }',
            'Nested function call' => '{= {hash} | array_reverse | implode "-" % }',
            'Assignment' => '{: $foo = {var.property-foo} }',
            'Function return assignment' => '{: $foo = ["foo", "bar", "baz"] | print_r true }',
        );
    }

}
